﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class IEnumeratorion : MonoBehaviour
{
    void Update()
    {
        if (gameObject.activeSelf==true)
        {
            StartCoroutine(Active());
        }
    }
    IEnumerator Active()
    {
        yield return new WaitForSeconds(2f);
        gameObject.SetActive(false);
    }
}
